﻿<UserControl x:Class="MaterialArgEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DesignHeight="150"
             d:DesignWidth="300"
             mc:Ignorable="d">
    <UserControl.Resources>
        <Style TargetType="{x:Type ComboBox}">
            <Setter Property="Margin" Value="3" />
        </Style>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="Margin" Value="3" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0"
                   Grid.Column="0"
                   HorizontalAlignment="Stretch"
                   VerticalAlignment="Center"
                   Text="{Binding Path=Line1LabelText}"
                   Visibility="{Binding Path=Line1Visibility}" />
        <ComboBox Grid.Row="0"
                  Grid.Column="1"
                  IsEnabled="{Binding Path=Line1Enabled}"
                  ItemsSource="{Binding Path=Line1DataSource}"
                  SelectedItem="{Binding Path=Line1SelectedItem,
                                         Mode=TwoWay,
                                         UpdateSourceTrigger=PropertyChanged}"
                  Visibility="{Binding Path=Line1Visibility}" />
        <TextBlock Grid.Row="1"
                   Grid.Column="0"
                   HorizontalAlignment="Stretch"
                   VerticalAlignment="Center"
                   Text="{Binding Path=Line2LabelText}"
                   Visibility="{Binding Path=Line2Visibility}" />
        <ComboBox Grid.Row="1"
                  Grid.Column="1"
                  IsEnabled="{Binding Path=Line2Enabled}"
                  ItemsSource="{Binding Path=Line2DataSource}"
                  SelectedItem="{Binding Path=Line2SelectedItem,
                                         Mode=TwoWay,
                                         UpdateSourceTrigger=PropertyChanged}"
                  Visibility="{Binding Path=Line2Visibility}" />
        <TextBlock Grid.Row="2"
                   Grid.Column="0"
                   HorizontalAlignment="Stretch"
                   VerticalAlignment="Center"
                   Text="{Binding Path=Line3LabelText}"
                   Visibility="{Binding Path=Line3Visibility}" />
        <ComboBox Grid.Row="2"
                  Grid.Column="1"
                  IsEnabled="{Binding Path=Line3Enabled}"
                  ItemsSource="{Binding Path=Line3DataSource}"
                  SelectedItem="{Binding Path=Line3SelectedItem,
                                         Mode=TwoWay,
                                         UpdateSourceTrigger=PropertyChanged}"
                  Visibility="{Binding Path=Line3Visibility}" />
        <StackPanel Grid.Row="4"
                    Grid.Column="0"
                    Grid.ColumnSpan="2"
                    HorizontalAlignment="Right"
                    Orientation="Horizontal">
            <Button Width="80" Margin="4">OK</Button>
            <Button Width="80" Margin="4">Cancel</Button>
        </StackPanel>
    </Grid>
</UserControl>
